﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SKG.DAL.Entities
{
    using System.ComponentModel.DataAnnotations;

    /// <summary>
    /// Số điện
    /// </summary>
    public class Ktx_Sodien
    {
        /// <summary>
        /// Khóa chính
        /// </summary>
        [Key]
        public Guid Id { set; get; }

        /// <summary>
        /// Tháng sử dụng
        /// </summary>
        public DateTime Thang { set; get; }

        /// <summary>
        /// Chỉ số cũ
        /// </summary>
        public int Socu { set; get; }

        /// <summary>
        /// Chỉ số mới
        /// </summary>
        public int Somoi { set; get; }

        #region Khóa ngoại tham chiếu tới

        /// <summary>
        /// Thuộc Phòng (khoá ngoại tham chiếu tới bảng Phòng)
        /// </summary>
        [ForeignKey("Phong")]
        public Guid? PhongId { set; get; } 
        /// <summary>
        /// Thuộc Phòng
        /// </summary>
        public virtual Ktx_Phong Phong { get; set; } 
        
        #endregion
    }
}
